from django.dispatch import receiver
from .signals import notification_sent
from .models import Notification


@receiver(notification_sent)
def create_notification(sender, **kwargs):
    print("**", kwargs)
    user = kwargs['user']
    message = kwargs['message']
    Notification.objects.create(user=user, message=message)
